﻿using UnityEngine;
using System.Collections;

public class GotoSummonCommonSceneBtn : MonoBehaviour {

	void OnClick()
	{
//		CSceneManager c = GameObject.FindObjectOfType(typeof(CSceneManager)) as CSceneManager;
//		c.GoToSummonCommonScene();
		
		LoadingWindow.window.ShowShortLoading();
		RestAPI.singleton.GetNormalGachaInfo(ReturnCallback);
	}
			
	void ReturnCallback(Hashtable returnData)
	{
		CSceneManager c = GameObject.FindObjectOfType(typeof(CSceneManager)) as CSceneManager;
		c.GoToSummonCommonScene();

		CharacterSummonManager.characterId = int.Parse(returnData["UnitId"].ToString());
//		LoadingWindow.window.HideLoading();
	}
}
